num1 = 1
num2 = 2
x = 0
print num1
print num2
list = [num2]
while num1 + num2 < 4000000:
    x = num1 + num2
    print x
    num1 = num2
    num2 = x
    if (x % 2 == 0):
        list.append(x)

print "even numbers in serie:"
sum = 0
for num in list:
    sum += num
    print num

print "sum: "+ str(sum)